package com.ltkj.file.service;

import java.util.List;

import com.ltkj.common.core.web.domain.AjaxResult;
import com.ltkj.system.api.domain.CommAttachment;
import com.ltkj.system.api.domain.CommAttachmentQueryVo;
import org.springframework.web.multipart.MultipartFile;

/**
 * 附件Service接口
 * 
 * @author chenzeen
 * @date 2023-08-30
 */
public interface ICommAttachmentService 
{
    /**
     * 查询附件
     * 
     * @param attaId 附件主键
     * @return 附件
     */
    public CommAttachment selectCommAttachmentByAttaId(Long attaId);

    /**
     * 查询附件列表
     * 
     * @param commAttachment 附件
     * @return 附件集合
     */
    public List<CommAttachment> selectCommAttachmentList(CommAttachment commAttachment);

    /**
     * 根据业务信息查询附件
     * @param commAttachment
     * @return
     */
    public List<CommAttachment> selectCommAttachmentListByInfo(CommAttachment commAttachment);

    /**
     * 新增附件
     * 
     * @param commAttachment 附件
     * @return 结果
     */
    public int insertCommAttachment(CommAttachment commAttachment);

    /**
     * 修改附件
     * 
     * @param commAttachment 附件
     * @return 结果
     */
    public int updateCommAttachment(CommAttachment commAttachment);

    /**
     * 批量删除附件
     * 
     * @param attaIds 需要删除的附件主键集合
     * @return 结果
     */
    public int deleteCommAttachmentByAttaIds(Long[] attaIds);

    /**
     * 删除附件信息
     * 
     * @param attaId 附件主键
     * @return 结果
     */
    public int deleteCommAttachmentByAttaId(Long attaId);

    /**
     * 修改业务ID和附件ID
     * @param attachment
     * @param attaIds
     * @return
     */
    public AjaxResult updateAttaData(CommAttachment attachment, String attaIds);

    /**
     * 根据业务id删除
     * @param attachment
     * @return
     */
    public int deletaAttaByInfo(CommAttachment attachment);

    /**
     * 上传多个附件
     * @param files
     * @param zoom
     * @param attachment
     * @return
     */
    public List<CommAttachment> uploadAttaDataMore(List<MultipartFile> files, String zoom, CommAttachment attachment) throws Exception;

    /**
     * 上传附件
     * @param file
     * @param zoom
     * @param attachment
     * @return
     */
    public CommAttachment uploadAttaData(MultipartFile file, String zoom, CommAttachment attachment) throws Exception;

    /**
     * 根据多条业务id和一个code查询附件
     * @param commAttachmentQueryVo
     * @return
     */
    List<CommAttachment> selectAttaByInfoIds(CommAttachmentQueryVo commAttachmentQueryVo);
}
